import React, { Component } from 'react';
import axios from 'axios';
class Test extends Component {
    render() {
        return (
            <div>
                测试跨域请求
            </div>
        );
    };
    componentDidMount() {
        // 使用axios 进行数据请求
        axios.get('/api/index/index').then(res => {
            console.log(res);
        })
        // axios.get('http://kumanxuan1.f3322.net:8001/index/index').then(res => {
        //     console.log(1, res);
        // })
    }
}

export default Test;
